home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
MATH
/
EEV100R1
/
TESTI.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-12-27
|
1KB
|
52 lines
program TestI;
{ This is a simple test program I used for INFIX.PAS }
Uses
crt,
infix;
var
MyReal : real;
MyErr : byte;
MyExpr : string;
MyBool : boolean;
MyAddr : Str20;
begin
{init test variables}
MyReal := 0;
MyErr := 0;
{add 2 and 2 and put the result (4) in @FRED@}
MyAddr := '@FRED@';
MyExpr := '2+2';
CalcAndStore(MyExpr,MyAddr,MyErr);
{multiply 3 by 7 and put the result (21) in @WILMA@}
MyAddr := '@WILMA@';
MyExpr := '3*7';
CalcAndStore(MyExpr,MyAddr,MyErr);
{add @FRED@ (4) and @WILMA@ (21), subtract 1 (24), and store in @DINO@}
MyAddr := '@DINO@';
MyExpr := '@FRED@+@WILMA@-1';
CalcAndStore(MyExpr,MyAddr,MyErr);
{look in @DINO@}
ReadVariable(MyAddr,MyReal,MyBool);
if MyBool then
{couldn't find variable - this is leftover from testing w/o TD}
MyReal := -99999;
{@DINO@ has 24 in it here -- check for yourself using TD or writeln}
{deallocate linked list's memory}
DestroyList;
end. {TestI}